|
|
|
|
|
|
|
and last moves. These three additional routines handle the actions that involve the command buttons: |
|
|
|
|
|
|
|
|
·BBInit: This routine creates the button set on your form. You can place the button set on the top, bottom, left, or right side of the form. |
|
|
|
|
|
|
|
|
·BBEnable: This short routine enables you to temporarily disable selected buttons on the bar to make sure the user does not mistakenly invoke a search action in the middle of an update action. |
|
|
|
|
|
|
|
|
·BBProcess: This routine is the heart of the data entry form. It links the button set with the previously mentioned record functions to provide a complete, customized data entry form for your applications. |
|
|
|
|
|
|
|
|
You design these routines to work with any dataset you select, as well as any form layout you choose, using any input controls (not just the Visual Basic data-bound controls). Also, you construct the routines as a set of methods within the standalone OLE Server. That way, you can add the record-handling routines to all your future programming projects. |
|
|
|
|
|
|
|
|
Finally, the OLE Server library has a handful of properties that you can use to control the behavior of the record-processing routines. The following is a list of the properties you need with the OLE Server: |
|
|
|
|
|
|
|
|
· WSName: This property is the local workspace name. |
|
|
|
|
|
|
|
|
· DBName: This property is the database name. |
|
|
|
|
|
|
|
|
· RSName: This property is the Recordset name or SQL statement. |
|
|
|
|
|
|
|
|
· RSType: This property is the value to indicate a table, Dynaset, or Snapshot object. |
|
|
|
|
|
|
|
|
· Index: This property is the index name to use for table objects. |
|
|
|
|
|
|
|
|
· IndexFlag: This property is a True/False toggle. When this property is True, use the Seek method. |
|
|
|
|
|
|
|
|
· BBAlign: This property is the alignment value that controls the appearance of the control buttons on the form. |
|
|
|
|
|
|
|
|
· Focus: This property is the field that gets first focus when you are adding or editing a record. |
|
|
|
|
|
|
|
|
In the following sections, you go through the process of building the code library. After the library is built, you build a simple form to add to the CompanyMaster project. This form uses all the library functions covered in this section. |
|
|
|
|
|
|
|
|
Preparing the Data Entry Form |
|
|
|
|
|
|
|
|
The routines we have designed make a few assumptions about how your data entry forms are constructed. These assumptions are very general and result in a solid, if not flashy, data entry |
|
|
|
|
|